<?php
    $post_fanpage_id = "post_id_".$this->id;
?>
<a id="<?php echo $post_fanpage_id ?>" class="cp_post_fanpage" href="#">
    <?php echo $this->translate('POST_TO_PAGE_WALL') ?>
</a>
<script>    
    jQuery("document").ready(function($){
        $("#<?php echo $post_fanpage_id;?>").click(function(){
            postToFanpageWall(                
                "<?php echo $this->social->getIdPage() ?>", 
                "<?php echo YouNet_Util::escapeForJs($this->title) ?>", 
                "<?php echo $this->url ?>", 
                "<?php echo $this->image ?>", 
                "<?php echo APPLICATION_NAME ?>",
                "<?php echo YouNet_Util::escapeForJs($this->description) ?>"
            ); 
        });
    });
</script>